EmergencyExerciseReviewForm=Ext.extend(Ext.Window,{
    constructor:function(a){
        Ext.apply(this,a);
        this.initUIComponents();
        EmergencyExerciseReviewForm.superclass.constructor.call(this,{
            id:'EmergencyExerciseReviewForm',
            title:'应急预案评审信息',
            modal:true,
            layout:'fit',
            items : yearGridFormPanel,
            buttons : yearGridFormButtons,
            iconCls : "menu-flowWait",
            width : 620,
            height : 375,
            buttonAlign:'center',
            buttonStyle:'padding:2px;'
        })
    },
    initUIComponents:function(){
        createyeargridform({
            operation:this,
            form:{
                saveUrl: __ctxPath+"/emergency/saveEmergencyExerciseReview.do",
                items:[
                        {
                            id : "emergencyExerciseReview.id",
                            name : "emergencyExerciseReview.id",
                            xtype : "hidden",
                            value : this.id == null ? "": this.id
                        }, {
                            name : "emergencyExerciseReview.years",
                            xtype : "hidden",
                            id : "emergencyExerciseReview.years",
                            value : this.years == null ? "" : this.years
                        }, {
                            name : "emergencyExerciseReview.emergencyId",
                            xtype : "hidden",
                            id : "emergencyExerciseReview.emergencyId",
                            value : this.emergencyId == null ? "" : this.emergencyId
                        },{
                            layout:'column',
                            bodyStyle:"padding:5px;",
                            border:false,
                            items:[{
                                layout:'form',
                                bodyStyle:'padding:5px;',
                                columnWidth:.5,
                                border:false,
                                items:[{
                                    xtype:'combo',
                                    fieldLabel:'所属机构',
                                    hiddenName:'emergencyExerciseReview.institution',
                                    mode:'local',
                                    editable:false,
                                    width:146,
                                    triggerAction:'all',
                                    store:new Ext.data.ArrayStore({
                                        id:0,
                                        fields:['id','type'],
                                        data:[ [ "1", "组织部" ],
                                               [ "2", "财务部" ],
                                               [ "3", "销售部" ]]
                                    }),
                                    valueField:'type',
                                    displayField:'type',
                                    value:'销售部'
                                }]
                            },{
                                layout:'form',
                                bodyStyle:'padding:5px;',
                                columnWidth:.5,
                                border:false,
                                items:[{
                                    xtype:'textfield',
                                    fieldLabel:'预案编号<font color="red">*</font>',
                                    name:'emergencyExerciseReview.emergencyNo',
                                    value : this.emergencyNo == null ? "" : this.emergencyNo,
                                    width:146,
                                    readOnly:true,
                                    allowBlank:false,
                                    maxLength:100
                                }]
                            },{
                                layout:'form',
                                bodyStyle:'padding:5px;',
                                columnWidth:.5,
                                border:false,
                                items:[{
                                    xtype:'textfield',
                                    fieldLabel:'评审人<font color="red">*</font>',
                                    name:'emergencyExerciseReview.revicePeople',
                                    width:146,
                                    allowBlank:false,
                                    maxLength:100
                                }]
                            },{
                                layout:'form',
                                bodyStyle:'padding:5px;',
                                border:false,
                                columnWidth:.5,
                                items:[{
                                    xtype:'textfield',
                                    fieldLabel:'部门',
                                    name:'emergencyExerciseReview.reviceDepartment',
                                    width:146,
                                    maxLength:200
                                }]
                            },{
                                layout:'form',
                                bodyStyle:'padding:5px;',
                                border:false,
                                columnWidth:.5,
                                items:[{
                                    xtype:'datefield',
                                    name:'emergencyExerciseReview.reviceTime',
                                    format:'y-m-d',
                                    allowBlank:false,
                                    fieldLabel:'评审时间<font color="red">*</font>',
                                    width:146,
                                    maxLength:100
                                }]
                            },{
                                layout:'form',
                                bodyStyle:'padding:5px;',
                                border:false,
                                columnWidth:1.,
                                items:[{
                                    xtype:'textfield',
                                    name:'emergencyExerciseReview.needAdditionalResources',
                                    fieldLabel:'需要补充资源',
                                    width:435
                                }]
                            }]
                        },{
                            layout:'column',
                            bodyStyle:"padding:5px;",
                            border:false,
                            items:[{
                                layout:'form',
                                bodyStyle:"padding:5px;",
                                columnWidth:1.,
                                items:[{
                                    xtype:'textarea',
                                    fieldLabel:'评审内容',
                                    name:'emergencyExerciseReview.reviceContent',
                                    width:448
                                }]
                            }]
                        },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:"form",
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:"textarea", 
                               fieldLabel: '评审结论', 
                               name: 'emergencyExerciseReview.appraisalConclusion', 
                               width : 448,
                               maxLength:4000
                               }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:'padding:5px;',
                           border:false,
                           items:[{
                               layout:'form',
                               bodyStyle:'padding:5px;',
                               columnWidth:1.,
                               items:[{
                                   xtype:'textarea',
                                   fieldLabel:'需改进内容',
                                   name:'emergencyExerciseReview.needToImproveTheContent',
                                   width:448,
                                   maxLength:4000
                               }]
                           }]
                       },{
                           layout:'column',
                           bodyStyle:"padding:5px;",
                           border:false,
                           items:[{
                               layout:'form',
                               bodyStyle:"padding:5px;",
                               columnWidth:1.,
                               items:[{
                               xtype:'textarea',
                               fieldLabel:'备注',
                               name:'emergencyExerciseReview.remark',
                               width:448,
                               maxLength:1000
                               }]
                           }]
                       }
               ]
            },
            loadData:{
                getUrl:__ctxPath +"/emergency/getEmergencyExerciseReview.do",
                preName : "emergencyExerciseReview"
            }
        });
    }
});